<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Ad_ManageSiteUsers.aspx.cs" Inherits="Admin_Ad_ManageSiteUsers" %>
<%@ Register Src="Include/Ad_footer.ascx" TagName="Ad_footer" TagPrefix="uc3" %>
<%@ Register Src="Include/Ad_left.ascx" TagName="Ad_left" TagPrefix="uc2" %>
<%@ Register Src="Include/Ad_header.ascx" TagName="Ad_header" TagPrefix="uc1" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Manage Site Users</title>
    
    <link href="include\styles.css" rel="stylesheet" />
    <script>
    function ChangeHeaderAsNeeded(chkBox)
    {
          
            if (CheckBoxIDs != null)
            {
                for (var i = 0; i < CheckBoxIDs.length; i++)
                {
                    var cb = document.getElementById(CheckBoxIDs[i]);
                    if (!cb.checked)
                    {
                        ChangeCheckBoxState(CheckBoxIDs[0], false);
                        return;
                    }
                }
            ChangeCheckBoxState(CheckBoxIDs[0], true);
            }
    }
           function ChangeCheckBoxState(id, checkState)
           {
              var cb = document.getElementById(id);
              if (cb != null)
              cb.checked = checkState;
           }

       function ChangeAllCheckBoxStates(checkState)
       {
          if (CheckBoxIDs != null)
          {
             for (var i = 0; i < CheckBoxIDs.length; i++)
             ChangeCheckBoxState(CheckBoxIDs[i], checkState);
          }
       }
       
       function DelConfirm()
       {
            var Resp=confirm("Are You Sure to Delete Record(s)?");
            if(Resp==true)
            {
            return true;
            }
            else
            {
            return false;
            }
       }
    
    </script> 
</head>
<body>
    <form id="form1" runat="server">
    <div>
        
        <table width="100%"  border="0" cellspacing="0" cellpadding="0">

	<!-- Masthead starts from here-->
	
	<uc1:Ad_header ID="Ad_header1" runat="server" />
	
	<!-- Masthead ends here-->
	
  <tr>
    <td></td>
    <td><table width="716" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="150" valign="top">
		
		<!-- Left panel starts from here-->
		
		<uc2:Ad_left ID="Ad_left1" runat="server" />
		
		<!-- Left panel ends from here-->
		</td>
        <td width="15" valign="top"><img src="../images/spacer.gif" width="15" height="1" /></td>
        <td width="551" valign="top"><table width="100%"  border="0" cellpadding="0" cellspacing="0" class="tblborder">
          <tr>
            <td width="2%" height="35"></td>
            <td width="96%" class="normalblack_12" align="center" ><b>Manage Site Users </b></td>
            <td width="2%"></td>
          </tr>
            <tr>
                <td height="35" width="2%">
                </td>
                <td align="right" class="normalblack_12" width="96%">
                    <asp:Label ID="lblDocs" runat="server" Text="Total Users:"></asp:Label><asp:Label
                        ID="lbltotUsers" runat="server"></asp:Label></td>
                <td width="2%">
                </td>
            </tr>
          <tr>
            <td height="15"></td>
            <td style="height: 43px; width: 526px;" colspan="2">
                <strong class="normalgrey_12">Name</strong>:<asp:TextBox ID="txtName" runat="server" Width="173px" OnTextChanged="txtName_TextChanged"></asp:TextBox>
                <strong class="normalgrey_12">Email</strong>:<asp:TextBox   ID="txtEmail" runat="server" Width="176px"></asp:TextBox>
                <asp:Button ID="butSerach" runat="server" Text="Go" OnClick="butSerach_Click" />
                <div align="right">
                </div> 
            </td> 
            <td></td>
          </tr>
          <tr>
            <td height="200"></td>
            <td valign="top" class="normalblack_12" align="center" >
                
                <asp:Label ID="lblMsg" runat="server" Font-Bold="False" ForeColor="Red"></asp:Label>
                
                <asp:GridView DataKeyNames="Id" ID="GridView1" runat="server" AutoGenerateColumns="False" ShowFooter="True" OnRowDeleting="GridView1_RowDeleting" OnRowDataBound="GridView1_RowDataBound" CssClass="normalgrey_12" Width="95%" AllowPaging="True" OnPageIndexChanging="GridView1_PageIndexChanging" OnRowCommand="GridView1_RowCommand"  >
                    <Columns>
                    
                        <asp:TemplateField HeaderText="Edit" >
                            <ItemTemplate  >
                               <a href="Ad_Adduser.aspx?id=<%# Eval("Id") %>" title="Edit Record"><img src="../images/editinfo.gif" border="0" /></a>                       
                            </ItemTemplate>
                            <FooterTemplate>
                                <asp:HyperLink ID="hypInsert" runat="server" NavigateUrl="Ad_Adduser.aspx"  ImageUrl="../images/new-imga.gif" ToolTip="Insert New Record"  /> 
                            </FooterTemplate> 
                        
                        </asp:TemplateField>
                                     
                        <asp:BoundField HeaderText="Name" DataField="Name" /> 
                        <asp:BoundField HeaderText="Email" DataField="Email" />
                        <asp:BoundField HeaderText="City" DataField="City" />
                        <asp:BoundField HeaderText="State" DataField="State" />
                        <asp:BoundField HeaderText="Address" DataField="Address1" />
                        
                            
                        <asp:TemplateField>
                            <ItemTemplate >                       
                                <asp:LinkButton CommandArgument="id"  CommandName="Delete" ID="lnkDelete" runat="server" ToolTip="Delete Record"><img src="../images/delete.gif" border="0" /> </asp:LinkButton>                        
                            </ItemTemplate>                  
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:TemplateField>
                        <asp:TemplateField>
                            <HeaderTemplate>
                                <asp:CheckBox ID="HeaderLevelCheckBox" runat="server" />
                            </HeaderTemplate>
                            <FooterTemplate>
                                <asp:Button ID="butDel" runat="server" CommandName="Del" Text="Delete" OnClientClick="return DelConfirm();" />
                            </FooterTemplate>
                            <ItemStyle HorizontalAlign="Center" />
                            <HeaderStyle HorizontalAlign="Center" />
                            <ItemTemplate>
                                <asp:CheckBox ID="RowLevelCheckBox" runat="server" Value='<%#DataBinder.Eval(Container.DataItem,"ID")%>' />
                            </ItemTemplate>
                            <FooterStyle HorizontalAlign="Center" />
                        </asp:TemplateField>
                    
                    </Columns>
                    <RowStyle HorizontalAlign="Left" />
                    <PagerStyle HorizontalAlign="Center" />
                    <FooterStyle HorizontalAlign="Left" />
                
                </asp:GridView>

            
            
            </td>
            <td></td>
          </tr>
          <tr>
            <td height="20"></td>
            <td></td>
            <td></td>
          </tr>
        </table></td>
      </tr>
    </table></td>
    <td></td>
  </tr>
  <tr>
    <td height="30" colspan="3"></td>
  </tr>
  <tr>
    <td height="1" bgcolor="#CCCCCC"><img src="../images/spacer.gif" width="1" height="1" alt="" /></td>
    <td bgcolor="#CCCCCC"><img src="../images/spacer.gif" width="1" height="1" alt="" /></td>
    <td bgcolor="#CCCCCC"><img src="../images/spacer.gif" width="1" height="1" alt="" /></td>
  </tr>
  <tr>
    <td height="20" colspan="3"></td>
  </tr>
  
	<!-- Bottom starts from here-->
	
    <uc3:Ad_footer ID="Ad_footer1" runat="server" />
	
	<!-- Bottom ends here-->
	
</table>

        
        
    
            
    </div>
    </form>
</body>
</html>
